package DiErZhou.Day1;

import java.util.Scanner;

public class Day1_14 {
    public static void main(String[] args) {
        double[] scoreEnglish=new double[10];
        double[] scoreChinese=new double[10];
        Scanner scanner = new Scanner(System.in);
        double sum=0,sum1=0;
        System.out.println("************************************");
        System.out.println("\t\t请输入本次考试的十位同学的成绩");
        System.out.println("************************************");
        for (int i = 0; i < scoreEnglish.length; i++) {
            System.out.println("\t\t请输入第"+ (i+1)+"学生的成绩");
            scoreEnglish[i]=scanner.nextDouble();
        }
        System.out.println("----------------输入结束----------------");
        for (int i = 0; i < scoreEnglish.length; i++) {
            sum+=scoreEnglish[i];
        }
        System.out.println("十位同学的英语平均成绩是："+sum/scoreEnglish.length);
        for (int i = 0; i < scoreChinese.length; i++) {
            System.out.println("\t\t请输入第"+ (i+1)+"学生的成绩");
            scoreChinese[i]=scanner.nextDouble();
        }
        System.out.println("----------------输入结束----------------");
        for (int i = 0; i < scoreChinese.length; i++) {
            sum1+=scoreChinese[i];
        }
        System.out.println("十位同学的语文平均成绩是："+sum/scoreChinese.length);
        if (sum/scoreEnglish.length>sum1/scoreChinese.length){
            System.out.println("十位同学的英语成绩优于语文成绩；恭喜英语老师");
        } else if(sum/scoreEnglish.length<sum1/scoreChinese.length){
            System.out.println("十位同学的语文成绩优于英语成绩；恭喜语文老师");
        }else {
            System.out.println("同学们不偏科，非常好！");
        }
    }
}
